<?php
$page1=$_GET['page'];
$page=((int)$page1-1)*40;
$mysqli=new Mysqli("localhost","root","root","siku");  
if(mysqli_connect_error()){
    echo mysqli_connect_error();
    exit();
}
$sql="SELECT * FROM goods LIMIT $page,40";
$result=$mysqli->query($sql);
if(mysqli_num_rows($result)){
  while($row=mysqli_fetch_assoc($result)){
    $arr[]=$row;
  }
  $data=Array("count"=>1,"list"=>$arr);
}else{
  $data=Array("count"=>0);
}
echo json_encode($data);